properties([
//    pipelineTriggers([
//         cron('*/1 * * * *')
//     ])
   parameters([
      [
         $class: 'ParameterSeparatorDefinition',
         name: 'FOO_HEADER',
         sectionHeader: 'Foo Parameters',
         separatorStyle: config.separatorStyle(),
         sectionHeaderStyle: config.sectionHeaderStyle()
      ],
      string(
         name: 'FOO 1'
      ),
      string(
         name: 'FOO 2'
      ),
      string(
         name: 'FOO 3'
      ),
      booleanParam(name: 'FORCE_REBUILD', defaultValue: false, description: 'Force Rebuild'),
    ])
 ])


// environment {
//       //param
//       packagename="211_roa_AssetBundle"
//       platform="Android"
//       applicationIdentifier="com.emagroups.lod2"
//       jobAddress="/Volumes/NSSD"
//       outputpath="$jobAddress/package/Android/apk"
//       projectPath="$jobAddress/project/android_bundle/Game"
//       resProjectPath="$jobAddress/project/android_bundle/Res"
//       bundleProjectPath="$jobAddress/project/android_bundle/Game/Assets/Bundles/Android"
//       shellDirectory="$jobAddress/project/android_bundle/Editor/Jenkins/ShellScript"
//       webPath="/Volumes/cool1/WebSites"
//       ipAddress="10.6.60.211"
//       configFile="$projectPath/Assets/LuaProject/Version.lua"

//       //Android Key
//       keystoreName="kol.keystore"
//       keystorePass="ema123"
//       keyaliasName="kol"
//       keyaliasPass="ema123"  
// }


env.packagename = "211_roa_AssetBundle"

def projectName = "Test"
def svnProjectPath = "/Users/Chijin/Documents/DistributeProject/chi/Res"

def rebuildLibraryArgvs()
{
   boolean rebuildLibrary = false
   return rebuildLibrary
}

boolean check()
{
   if(config.allValidNodes().find { it->it=="master1"} == null) 
      return false
   else
      return true;
}

node("chijinMacpro")
{
   stage("测试")
   {
      def mainfestFile = "$svnProjectPath/distribute.manifest"
      datas = readYaml (file: "${mainfestFile}")

      echo "${datas.assetBundleNames.size()}"
      echo "${datas.assetBundleNames[0].m_AssetBundleName}"

   }
}